#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
tar xzf $3
rm -rf Torch5*/3rdparty Torch5*/website
rm -f $3
tar czf $3 Torch5*
rm -rf Torch5*

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $3 $origDir
  echo "moved $3 to $origDir"
fi

exit 0
